package com.ruoyi.produce.report.procedureTransfer.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.produce.report.procedureTransfer.domain.ProcedureTransfer;
import com.ruoyi.produce.report.procedureTransfer.service.IProcedureTransferService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/produce/form")
public class ProcedureTransferController extends BaseController {

    @Autowired
    private IProcedureTransferService procedureTransferService;

    /**
     * 查找工序移交报表
     * @param procedureTransfer
     * @return
     */
    @PostMapping("/procedure/transfer")
    public TableDataInfo procedureTransferList(@RequestBody ProcedureTransfer procedureTransfer) {
        startPage();
        List<ProcedureTransfer> procedureTransfers = procedureTransferService.selectProcedureTransferForm(procedureTransfer);
        return getDataTable(procedureTransfers);
    }
}
